import {
    doExec
} from '@/api/request'

const apiPrefix = window.apiPrefix;

export const api = {
    // 系统管理员
    manage: {
        // 登录
        login(opts) {
            return doExec(`${apiPrefix}admin/loginApp`, opts);
        },
        out(opts) {
            return doExec(`${apiPrefix}out`, opts);
        }
    },
    // 水源监测
    shuiyuanjiance: {
        uploadUrl(opts) {
            return doExec(`${apiPrefix}api/safe/uploadFile`, opts, 'formdata');
        }
    },
    // 水厂监测
    shuichangjiance: {
        list(opts) {
            return doExec(`${apiPrefix}admin/appmess/list`, opts, );
        }
    },
    // 供水泵站
    gongshuibengzhan: {

    },
    // 供水管网
    gongshuiguanwang: {
        //片区列表
        eareas(opts) {
            return doExec(`${apiPrefix}api/eareas`, opts);
        },
        //供水管网列表
        watersupnets(opts) {
            return doExec(`${apiPrefix}api/watersupnets`, opts);
        },
        //供水管网实时详情
        deatil(opts) {
            return doExec(`${apiPrefix}api/watersupnets/deatil`, opts);
        },
        //供水管网值时间列表
        pipetime(opts) {
            return doExec(`${apiPrefix}api/pipetime`, opts);
        },
    },
    // 大用户监测
    dayonghujiance: {

    },
    // 排水泵站
    paishuibengzhan: {
        //排水泵站列表
        drainagepumings(opts) {
            return doExec(`${apiPrefix}api/drainagepumings`, opts);
        },
        //排水泵站详情
        details(opts) {
            return doExec(`${apiPrefix}api/drainagepumings/details`, opts);
        },
        //总览图表详情
        waterqualitytime(opts) {
            return doExec(`${apiPrefix}api/waterqualitytime`, opts);
        },
        //流量时间列表
        watertime(opts) {
            return doExec(`${apiPrefix}api/watertime`, opts);
        },
        //压力时间列表
        pressuretime(opts) {
            return doExec(`${apiPrefix}api/pressuretime`, opts);
        }
    },
    // 排水管网
    paishuiguanwang: {
        // 排水管网列表
        drainnets(opts) {
            return doExec(`${apiPrefix}api/drainnets`, opts);
        },
    },
    // 污水厂监测
    wushuichangjiance: {
        //设备查询列表
        sewageplants(opts) {
            return doExec(`${apiPrefix}api/sewageplants`, opts);
        },
        //进水点位/出水点位列表
        detailsList(opts) {
            return doExec(`${apiPrefix}api/sewageplants/details`, opts);
        },
        //进水点位
        detailsIn(opts) {
            return doExec(`${apiPrefix}api/sewageplants/details/in`, opts);
        },
        //出水点位
        detailsOut(opts) {
            return doExec(`${apiPrefix}api/sewageplants/details/out`, opts);
        },
        //对应视频列表
        videoList(opts) {
            return doExec(`${apiPrefix}api/video/waterworks/video`, opts);
        },
        //水量时间列表
        watertime(opts) {
            return doExec(`${apiPrefix}api/watertime`, opts);
        }

    }
};